<template>
  <base-form :form="form">
    <div class="label">{{ $t('节目类型') }}</div>
    <el-form-item label-width="0">
      <el-select v-model="form.type" class="full-width" @change="change">
        <el-option 
          v-for="item in programTypeOpts"
          :key="item.value"
          :value="item.value"
          :label="item.label"></el-option>
      </el-select>
    </el-form-item>
    <!-- <div class="label">屏幕旋转</div>
    <el-form-item label-width="0">
      <el-select class="full-width"></el-select>
    </el-form-item>
    <el-form-item label="视频旋转" label-width="100px">
      <el-checkbox></el-checkbox>
    </el-form-item>
    <el-form-item label="图片旋转" label-width="100px">
      <el-checkbox></el-checkbox>
    </el-form-item>
    <el-form-item label="视频图片同步" label-width="100px">
      <el-checkbox></el-checkbox>
    </el-form-item>
    <el-form-item label="禁止终端同步" label-width="100px">
      <el-checkbox></el-checkbox>
    </el-form-item> -->
  </base-form>
</template>

<script>
import BaseForm from './BaseForm'
import {programTypeOpts} from '../../const'

export default {
  components: {
    BaseForm
  },
  inject: ['dialogId'],
  props: {
    form: {
      type: Object,
      default() {
        return {}
      }
    }
  }, 
  data() {
    return {
      programTypeOpts
    }
  },
  methods: {
    change(v) {
      this.$eventBus.$emit(this.dialogId ? `programTypeChange-${this.dialogId}` : 'programTypeChange', v)
    }
  }
}
</script>

<style lang="scss" scoped>
.label {
  margin-bottom: 15px;
}
.full-width {
  width: 242px;
}
</style>